<template>
	<view class="order">
		<view v-if="typekey == 0" class="head_box w750 flex">
			<view class="qingxz s24 familytow fblod">请选择配送方式</view>
			<view class="kdfh">
				<radio-group @change="radioChange">
					<view class="flex">
						<label class="radio s24 family f500 flex" v-for="(item, index) in sendType" :key="index">
							<view>
								<radio class="radio_txt" color="#EBBE87" :value="item.value" :checked="index === current" />
							</view>
							<view class="txt">{{ item.name }}</view>
						</label>
					</view>
				</radio-group>
			</view>
		</view>
		<view class="add_shdz w100" v-if="typekey == 0">
			<view class="flex" @click="onAddres">
				<view class="add_shdz_icon" v-if="defaultAddress == '' && goodsDetail.addressData == ''">
					<image class="w100 h100" src="../../static/add_shdz.png" mode=""></image>
				</view>
				<view v-if="goodsDetail.addressData.name" class="add_shdz_txt s28 family f500" style="margin-left: 32upx">
					{{ goodsDetail.addressData.name || '' }}&nbsp;{{ goodsDetail.addressData.mobile || '' }}&nbsp;
					<template v-if="sendType[current].name != '到店自提'">
						{{ goodsDetail.addressData.province || '' }}{{ goodsDetail.addressData.city || '' }}{{ goodsDetail.addressData.district || '' }}
					</template>
				</view>
				<view v-else-if="defaultAddress.name" class="add_shdz_txt s28 family f500" style="margin-left: 32upx">
					{{ defaultAddress.name || '' }}&nbsp;{{ defaultAddress.mobile || '' }}&nbsp;
					<template v-if="sendType[current].name != '到店自提'">{{ defaultAddress.province || '' }}{{ defaultAddress.city || '' }}{{ defaultAddress.address || '' }}</template>
				</view>
				<view v-else class="add_shdz_txt s28 family f500">
					{{ sendType[current].name != '到店自提' ? '添加收货地址' : '选择用户信息' }}
				</view>
				<view class="right_jt_icon">
					<image class="w100 h100" src="../../static/personal/right_jian.png" mode=""></image>
				</view>
			</view>
			<view class="add_box_xian w100">
				<image class="w100 h100" src="../../static/add_border_xian.png" mode=""></image>
			</view>
		</view>
		<block v-if="typekey == 1">
			<view class="tuijian_box flex">
				<view class="tuijianren_txt s28 family f500" style="margin-left: 30upx;/">姓名</view>
				<input class="uni-input" style="margin-left: 82upx" v-model="name" placeholder="请输入姓名" placeholder-class="s26" />
			</view>
			<view class="tuijian_box flex">
				<view class="tuijianren_txt s28 family f500" style="margin-left: 30upx;/">手机号</view>
				<input class="uni-input" v-model="phone" type="number" maxlength="11" placeholder="请输入手机号" placeholder-class="s26" />
			</view>
		</block>
		<view class="tuijian_box flex">
			<view class="tuijianren_txt s28 family f500" style="margin-left: 30upx">推荐人</view>
			<view class="tuijianren_txt s28 family f500" style="margin-left: 70upx">
				{{ referrerName ? referrerName : '' }}
			</view>
			<!-- <view
        class="search s26 family f500"
        v-if="!referrerName"
        @click="goScreen"
        >搜索</view
      > -->
		</view>
		<!-- 商品详情 -->
		<view class="goods_list_box" v-for="(item, index) in goodsDetail.orderData.lists" :key="index" v-if="typekey == 0">
			<view class="header_box_goods flex">
				<view class="add_shdz_icon">
					<image class="w100 h100" :src="item.shop_avatar" mode=""></image>
				</view>
				<view class="add_shdz_txt s28 family f500">
					{{ item.shop_name }}
				</view>
				<view class="right_jt_icon">
					<image class="w100 h100" src="../../static/personal/right_jian.png" mode=""></image>
				</view>
			</view>
			<block v-for="(items, indexs) in item.products" :key="indexs">
				<view class="goods_box_detail">
					<view class="flex">
						<view class="goods_image_box">
							<image class="w100 h100" :src="items.sku.thumbnail ? items.sku.thumbnail : items.image_src" mode=""></image>
						</view>
						<view class="right_name_state_money">
							<view class="goods_name s26 family f500">
								{{ spceType(items.title, items.sku.difference.join(' '), items.sku.spec_type) }}
							</view>
							<view class="flex s24 familythree f400" style="margin-top: 12upx; width: 400rpx; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #999">
								【已选】
								<text class="s24 familythree f400" style="overflow: hidden; text-overflow: ellipsis" v-for="(value, values) in items.sku.difference" :key="values">
									{{ value }},&nbsp;
								</text>
								数量{{ items.number }}
							</view>
							<view class="money_box flex">
								<!-- <text class="money_icon s24">￥</text> -->
								<view class="mone_txt s36">￥{{ items.sku.price }}</view>
								<view class="zen_jan flex">
									<view class="jan_box" @click="goodsNumJian(items.number, index, indexs)">
										<view class="jan"></view>
									</view>
									<view class="num_txt s28 fblod familytow">
										{{ items.number }}
									</view>
									<view class="jia_box s40 fblod txtali" @click="goodsNumJia(items.number, index, indexs)">+</view>
								</view>
							</view>
						</view>
					</view>
				</view>
				<view class="zen_goods_box">
					<view class="zen_box_list" v-if="typekey == 0">
						<block>
							<view class="zen_list flexjus" v-for="(goods, goodss) in items.gift" :key="goodss">
								<view class="zen_left_txt s22 familythree f400">【赠品】{{ goods.name }}</view>
								<view class="zen_num s22 familythree f400">X{{ goods.number }}</view>
							</view>
						</block>
					</view>
					<view class="pt_yh_txt flexjus" v-if="items.discount_amount !== 0 && is_coupon == '0'">
						<view class="txt_left s24 familythree f400">会员优惠</view>
						<view class="txt_right s24 familythree f400">-￥{{ items.discount_amount }}</view>
					</view>
					<view class="pt_yh_txt flexjus" v-if="discount_amounts !== 0 && is_coupon == '1'">
						<view class="txt_left s24 familythree f400">优惠券</view>
						<view class="txt_right s24 familythree f400">-￥{{ Number(goodsDetail.orderData.statis.money) - item.discount_amount }}</view>
					</view>
					<view class="pt_yh_txt flexjus" v-if="(flag == true || item.freight_price_bak != 0) && sendType[current].name == '快递配送'">
						<view class="txt_left s24 familythree f400">快递费</view>
						<view class="txt_right s24 familythree f400" style="color: #333333">￥{{ item.freight_price_bak || 0 }}</view>
					</view>
					<view class="pt_yh_txt flex">
						<view class="txt_left s24 familythree f400">备注</view>
						<textarea v-model="beizhu" class="uni_ipt s24 familythree f400" style="flex: 1" auto-height="true" placeholder="请输入备注信息"></textarea>
					</view>
				</view>
			</block>
			<view class="xiaoji_txt flex">
				<view class="xj_txt s28 family f500">小计：</view>
				<view class="money_txt s28 family f500">￥{{ sendType[current].name == '快递配送' ? price : order_price }}</view>
			</view>
		</view>

		<!-- 婚纱详情 -->
		<view class="goods_list_box" v-if="typekey == 1">
			<view class="header_box_goods flex">
				<view class="add_shdz_icon">
					<image class="w100 h100" :src="packageData.shop_avatar" mode=""></image>
				</view>
				<view class="add_shdz_txt s28 family f500">
					{{ packageData.shop_name }}
				</view>
			</view>
			<view class="goods_box_detail">
				<view class="flex">
					<view class="goods_image_box">
						<image class="w100 h100" :src="packageData.image_src" mode=""></image>
					</view>
					<view class="right_name_state_money">
						<view class="goods_name s26 family f500">
							{{ packageData.name }}
						</view>
						<view class="money_box flex" style="margin-top: 28upx">
							<text class="money_icon s22">￥</text>
							<view class="mone_txt s36">
								{{ packageData.price }}
							</view>
							<view class="huaxian_money s24 f400">￥{{ packageData.scribing_price }}</view>
						</view>
					</view>
				</view>
			</view>
			<view class="zen_goods_box">
				<view class="dress_box_list flex">
					<view class="dress_title_txt family fblod s24">已选套餐</view>
					<view>
						<view class="dress_list_box flexjus" v-for="(item, index) in packageData.selectSpec" :key="index">
							<view class="dress_name_txt s24 family f500">
								{{ item.name }}
							</view>
							<view class="family f500 s24" style="width: 100rpx; text-align: right; color: #888">×{{ item.number }}</view>
							<view class="dress_price family f500 s24" style="width: 100rpx; margin-left: 20rpx">￥{{ item.price }}</view>
						</view>
					</view>
				</view>
				<view class="dress_box_list flex">
					<view class="dress_title_txt family fblod s24">免费赠送</view>
					<view>
						<view class="dress_list_box flexjus" v-for="(i, idx) in packageData.gift" :key="idx">
							<view class="dress_name_txt s24 family f500">
								<text v-if="i.spec_type == 1" style="margin-right: 4px">{{ i.difference }}</text>
								{{ i.name }}
								<text v-if="i.spec_type == 2" style="margin-left: 4px">{{ i.difference }}</text>
							</view>
							<view class="family f500 s24" style="width: 77rpx; text-align: right; color: #888">
								×
								{{ i.number }}
							</view>
							<view class="dress_price family f500 s24">￥{{ i.price }}</view>
						</view>
					</view>
				</view>
				<view class="yl_class">
					<view class="class-con flexjus" v-for="(item, i) in classi" :key="i">
						<view class="class-left s24 familythree">
							{{ item.type }}
						</view>
						<view class="class-right s24 familythree">
							<template v-if="item.type == '拍摄费用' || item.type == '化妆费用'">￥</template>
							{{ item.title || '' }}
						</view>
					</view>
				</view>
				<view class="pt_yh_txt flexjus" v-if="packageData.discountAmount != 0 && is_coupon == '0'">
					<view class="txt_left s24 familythree f400">会员优惠</view>
					<view class="txt_right s24 familythree f400">-￥{{ packageData.discountAmount }}</view>
				</view>

				<view class="pt_yh_txt flexjus" v-if="packageData.discountAmount != 0 && is_coupon == 1">
					<view class="txt_left s24 familythree f400">优惠券</view>
					<view class="txt_right s24 familythree f400">-￥{{ packageData.discountAmount }}</view>
				</view>
				<!-- <view class="pt_yh_txt flexjus" v-if="juanData && juanData.limit <= order_price && juanData.nums > 0">
						<view class="txt_left s24 familythree f400">
							异业券
						</view>
						<view class="txt_right s24 familythree f400">
							-￥{{juanData.price}}
						</view>
					</view> -->
				<view class="pt_yh_txt flex">
					<view class="txt_left s24 familythree f400">备注</view>
					<textarea v-model="beizhu" style="flex: 1" class="uni_ipt s24 familythree f400" auto-height="true" placeholder="请输入备注信息"></textarea>
				</view>
			</view>
			<view class="xiaoji_txt flex">
				<view class="xj_txt s28 family f500">小计：</view>
				<view class="money_txt s28 family f500">￥{{ sendType[current].name == '快递配送' ? price : order_price }}</view>
			</view>
		</view>
		<view class="dibu_fukuan_box">
			<view class="fukuan_box flex">
				<view :class="[listIndex == true ? 'left_btn_active' : 'left_btn', 's28', 'family', 'f500', 'txtali']" @click="onDjQk">全款支付</view>
				<view :class="[listIndex == false ? 'right_box' : 'right_btn']" @click="onDjQk" v-if="prepayPrice != 0 && typekey == 0">
					<view class="ding_j_txt s28 family f500 txtali">定金支付</view>
					<view class="bottom_txt s20 family f500 txtali" v-if="listIndex == false">需先支付{{ prepayPrice }}元</view>
				</view>
				<view :class="[listIndex == false ? 'right_box' : 'right_btn']" @click="onDjQk" v-if="prepayPrice != 0 && typekey == 1">
					<view class="ding_j_txt s28 family f500 txtali">定金支付</view>
					<block v-if="typekey == 1">
						<view class="bottom_txt s20 family f500 txtali" v-if="listIndex == false">需先支付{{ prepayPrice }}元</view>
					</block>
				</view>
			</view>
			<view class="bottom_txt_zf flexjus" v-if="listIndex == true && balanceLength != 0 && balance != 0">
				<view class="flex">
					<view class="cz_zhifu s24 familythree f400">使用充值支付</view>
					<view class="yue_txt s22 familythree f400">(余额{{ balance }}元)</view>
				</view>
				<view class="flex" v-if="typekey == 0">
					<view class="goods_money_bot_txt s22 familythree f400">
						-￥{{ parseFloat(balance) > (sendType[current].name == '快递配送' ? price : order_price) ? (sendType[current].name == '快递配送' ? price : order_price) : balance }}
					</view>
					<switch :checked="switchFlag" :disabled="disabled" color="#EBBE87" style="margin-left: -10rpx; margin-top: -16rpx; transform: scale(0.5, 0.5)" />
					<text @click="setWStatus" style="position: absolute; display: inline-block; width: 50%; right: 0; height: 70upx"></text>
				</view>
				<view class="flex" v-if="typekey == 1">
					<view class="goods_money_bot_txt s22 familythree f400">-￥{{ price }}</view>
					<switch
						:checked="switchFlagTwo"
						:disabled="disabledTwo"
						color="#EBBE87"
						style="margin-left: -10rpx; margin-top: -16rpx; transform: scale(0.5, 0.5)"
						@change="getSwitchTwo"
					/>
					<text @click="setWStatus2" style="position: absolute; display: inline-block; width: 50%; right: 0; height: 70upx"></text>
				</view>
			</view>
		</view>
		<view class="bottom_box w100 flex" :style="{ height: type == true ? '166rpx' : '98rpx' }">
			<view class="zong_money_txt s28 familythree f400" v-if="typekey == 0">
				总计:￥{{ listIndex ? (computed_price != null ? computed_price : sendType[current].name == '快递配送' ? price : order_price) : prepayPrice }}
			</view>
			<view class="zong_money_txt s28 familythree f400" v-if="typekey == 1">
				总计:￥{{ listIndex ? (computed_price != null ? computed_price : sendType[current].name == '快递配送' ? price : order_price) : prepayPrice }}
			</view>
			<view class="submit_btn s32 familytow fblod txtali" @click="orderSubmit">提交订单</view>
		</view>
		<u-popup :show="orderPopup" mode="center" @close="handlePopupClose" round="20">
			<view style="width: 500rpx; padding: 60rpx 60rpx 0px 60rpx">
				<view style="font-size: 16px; line-height: 30px">此{{ switchFlagTwo ? '套系' : '商品' }}设有推荐分成/解锁金额，使用充值时，将取消该订单推荐人的分成奖励/解锁奖励</view>
				<view style="padding-top: 40rpx; padding-bottom: 40rpx; display: flex; justify-content: space-between; align-items: center">
					<view style="color: #999999; font-size: 16px; font-weight: 500" @click="handleCancel">不使用充值</view>
					<view style="color: #9c262e; font-size: 16px; font-weight: 500" @click="handleSubmitSure">继续使用充值</view>
				</view>
			</view>
		</u-popup>
	</view>
</template>

<script>
export default {
	data() {
		return {
			beizhu: '',
			flag: true,
			flagTwo: false,
			flagthree: false,
			type: null,
			goodsData: [],
			balance: '',
			goodsDetail: {
				orderData: {
					lists: []
				}
			},
			packageData: {},
			addOrderData: [],
			listIndex: true,
			popupShow: {
				popupShow: false
			},
			gift: {},
			packageGive: {},
			defaultAddress: {},
			items: [],
			price: 0, //包含快递费
			order_price: 0, //不包含快递费
			token: '',
			referrerId: 0,
			referrerName: '',
			switchFlag: false,
			switchFlagTwo: false,
			disabled: false,
			disabledTwo: false,
			typekey: -1,
			prepayPrice: 0,
			prepay: true,
			dressList: [],
			totalPrice: 0,
			share_user_id: '',
			name: '',
			phone: '',
			datetimesingle: '',
			orderPopup: false,
			packageOrderData: [],
			balanceList: [],
			sendType: [],
			current: 0,
			referees: '',
			check_godds_num: false,
			spec_list: [],
			spec_money: 0,
			classi: [
				{
					type: '拍摄类型',
					title: ''
				},
				{
					type: '拍摄档期',
					title: ''
				},
				{
					type: '拍摄师',
					title: ''
				},
				{
					type: '拍摄费用',
					title: ''
				},
				{
					type: '化妆师',
					title: ''
				},
				{
					type: '化妆费用',
					title: ''
				}
			],
			is_coupon: 0, //0从商品列表进来的 1 从优惠券列表进来的
			coupon_id: '',
			discount_amounts: 0,
			juanData: null,
			juanPrice: '',
			leve: '',
			balanceLength: 0,
			computed_price: null
		};
	},
	onLoad(option) {
		// this.loadData();
		this.leve = JSON.parse(option.data).leve;
		this.is_coupon = uni.getStorageSync('is_coupon');
		if (this.is_coupon == '1') {
			this.coupon_id = uni.getStorageSync('coupon_id');
		}
		this.type = this.bottomNav();
		this.typekey = option.flag;
		this.totalPrice = option.price;
		if (JSON.parse(option.data).share_user_id) {
			this.share_user_id = JSON.parse(option.data).share_user_id;
		}
		if (Number(option.flag) == 0) {
			if (option.type == 1) {
				this.goodsData = JSON.parse(option.data);
			} else {
				this.goodsData.push(JSON.parse(option.data));
			}
			this.loadData();
			this.getGoodsDeatil();
		} else {
			this.dressList.push(JSON.parse(option.data));
			this.spec_list = JSON.parse(option.data);
			this.spec_list = Object.values(this.spec_list);
			let obj = {
				sys_id: JSON.parse(option.data).obj.taoxiId,
				worker_z_id: JSON.parse(option.data).obj.worker_z_id ? JSON.parse(option.data).obj.worker_z_id : '',
				worker_s_id: JSON.parse(option.data).obj.worker_s_id,
				type_id: JSON.parse(option.data).obj.type_id,
				shop_id: this.$store.state.shopsname.id,
				time: JSON.parse(option.data).obj.times == '不指定' ? '' : JSON.parse(option.data).obj.times,
				user_id: uni.getStorageSync('userInfo').id
			};
			this.get_s_info(obj);
			this.getPackageDeatil();
			this.flagthree = true;
		}
		this.getScreen();
	},
	onShow() {
		this.getAddres();
		this.juanData = uni.getStorageSync('juanData');
	},
	onShareAppMessage(res) {
		return false;
	},
	watch: {
		goodsDetail: {
			handler(val) {
				let money = 0;
				let express = 0;
				if (val?.orderData?.lists) {
					val.orderData.lists.map((item, index) => {
						express = item.freight_price_bak;
						this.discount_amounts = item.discount_amount;
						if (express) {
							item.products.map((items, indexs) => {
								money += Number(items.number) * Number(items.sku.price) + Number(express) - Number(items.discount_amount);
							});
							// 定金
						} else {
							item.products.map((items, indexs) => {
								money += Number(items.number) * Number(items.sku.price);
							});
							// 定金
						}
					});
				}
			},
			deep: true
		}
	},
	methods: {
		//获取摄影师名称等信息
		get_s_info(obj) {
			this.$request({
				url: 'wedding/sys_appointment',
				method: 'POST',
				data: obj
			}).then((res) => {
				if (res.data.code == 0) {
					uni.showToast({
						title: res.data.msg,
						icon: 'none'
					});
					setTimeout((res) => {
						uni.navigateBack({
							delta: 1
						});
					}, 800);
					return;
				}
				this.loadPackage(res.data.data.id);
				uni.setStorageSync('yuyueid', res.data.data.id);
				this.classi[0].title = res.data.data.type_name;
				this.classi[1].title = res.data.data.time;
				if (res.data.data.time == '' || res.data.data.time == null) {
					this.classi[1].title = '未定';
				}
				this.classi[2].title = res.data.data.s_name;
				if (res.data.data.s_name == '' || res.data.data.s_name == null) {
					this.classi[2].title = '未定';
				}
				this.classi[3].title = res.data.data.s_price;
				this.classi[4].title = res.data.data.z_name;
				if (res.data.data.z_name == '' || res.data.data.z_name == null) {
					this.classi[4].title = '未定';
				}
				this.classi[5].title = res.data.data.z_price;
				this.datetimesingle = res.data.data.time;
			});
		},
		// 下单后获取选择完规格的详情
		loadData(address_id) {
			this.$request({
				url: 'order/getOrderGoodsList',
				method: 'POST',
				data: {
					data: this.goodsData,
					address_id: address_id,
					is_coupon: this.is_coupon,
					coupon_id: this.coupon_id,
					share_user_id: this.share_user_id ? this.share_user_id : ''
				}
			}).then((res) => {
				const { code, data, msg } = res.data;
				let freigthPrice = 0;
				if (code == 1) {
					this.referrerId = data.referr.id;
					this.referrerName = data.referr.name;
					this.token = data.token;
					this.goodsDetail = data;
					this.sendType = [];
					let discount_amount = 0; //优惠券减去的价格
					data.orderData.lists[0].products[0].send_type.forEach((item, index) => {
						this.sendType.push({
							name: item,
							value: item
						});
					});
					this.referees = data.referr.name;
					data.orderData.lists.map((item, index) => {
						freigthPrice += Number(item.freight_price_bak);
						discount_amount = Number(item.discount_amount);
					});
					let order_price = Number(data.orderData.statis.order_price);
					if (this.juanData?.limit <= order_price && this.juanData?.nums > 0) {
						this.juanPrice = this.juanData.price;
					} else {
						this.juanPrice = 0;
					}
					this.prepayPrice = data.orderData.statis.p_money.toFixed(2);
					if (this.is_coupon) {
						this.price =
							Number(data.orderData.statis.money) - this.juanPrice - discount_amount >= 0
								? (Number(data.orderData.statis.order_price) - (Number(data.orderData.statis.order_price) - discount_amount)).toFixed(2)
								: '0.00';
						this.check_goods_num = data.orderData.statis.money;
						this.order_price =
							Number(data.orderData.statis.order_price) - this.juanPrice - discount_amount >= 0
								? (Number(data.orderData.statis.order_price) - (Number(data.orderData.statis.order_price) - discount_amount)).toFixed(2)
								: '0.00';
					} else {
						this.price = Number(data.orderData.statis.money) - this.juanPrice - discount_amount >= 0 ? Number(data.orderData.statis.order_price).toFixed(2) : '0.00';
						this.check_goods_num = data.orderData.statis.money;
						this.order_price = Number(data.orderData.statis.order_price) - this.juanPrice - discount_amount >= 0 ? Number(data.orderData.statis.order_price).toFixed(2) : '0.00';
					}

					this.getBalance();
				} else {
					uni.showModal({
						title: '提示',
						content: msg,
						showCancel: false,
						success: function (res) {
							if (res.confirm) {
								uni.navigateBack();
							}
						}
					});
				}
			});
		},
		changeLog(e) {
			return false;
		},
		// 婚纱下单获取数据
		loadPackage(data) {
			this.$request({
				url: 'order/getPackageOrder',
				method: 'POST',
				data: {
					data: this.dressList,
					appointment: data,
					is_coupon: this.is_coupon,
					coupon_id: this.coupon_id
				}
			}).then((res) => {
				if (res.data.code == 0) {
					uni.showModal({
						title: '提示',
						content: res.data.msg,
						showCancel: false,
						success: function (res) {
							if (res.confirm) {
								uni.navigateBack();
							}
						}
					});
					return;
				}
				this.referrerName = res.data.data.referr.name;
				this.referrerId = this.share_user_id ? this.share_user_id : res.data.data.referr.id;
				this.packageData = res.data.data.orderData.lists;
				this.packageData.lengths = this.packageData.coupon.length;
				//定金
				this.prepayPrice = res.data.data.statis.p_money.indexOf('.') != -1 ? res.data.data.statis.p_money : res.data.data.statis.p_money.toFixed(2);
				//总价 diy 差价+摄影师费用+化妆师费用+本身套系价格 = 总价
				this.price = res.data.data.statis.money.indexOf('.') != -1 ? res.data.data.statis.money : res.data.data.statis.money.toFixed(2);
				this.packageData.selectSpec = this.dressList[0].spec;
				this.packageData.selectSpec.map((item, index) => {
					this.spec_money += Number(item.price * item.number);
				});
				this.price = this.price < 0 ? 0 : this.price;
				//原价
				this.order_price = res.data.data.statis.money.indexOf('.') != -1 ? res.data.data.statis.money : res.data.data.statis.money.toFixed(2);
				this.order_price = this.order_price < 0 ? 0 : this.order_price;
				this.getBalance();
			});
		},
		// 跳转选择收货地址
		onAddres() {
			uni.navigateTo({
				url: '/pages/filePages/addres/addres?order_id=' + this.goodsData.goods_id + '&source=1'
			});
		},

		// 获取默认地址
		getAddres() {
			this.$request({
				url: 'common/getAddress',
				method: 'POST'
			}).then((res) => {
				if (res.code == 1) {
					this.defaultAddress = res.data.data.address;
				}
			});
		},

		// 查询折扣和赠送
		getGoodsDeatil() {
			let id = [];
			this.goodsData.map((item, index) => {
				id.push(item.sku_id);
			});
			this.$request({
				url: 'product/getDiscount',
				data: {
					id: id.toString(),
					share_user_id: this.share_user_id,
					is_coupon: uni.getStorageSync('is_coupon'),
					coupon_id: uni.getStorageSync('coupon_id')
				}
			}).then((res) => {
				this.gift = res.data.data;
			});
		},
		// 查询婚纱折扣和赠送
		getPackageDeatil() {
			this.$request({
				url: 'package/getDiscount',
				data: {
					id: this.dressList[0].package_id,
					share_user_id: this.share_user_id ? this.share_user_id : '',
					is_coupon: uni.getStorageSync('is_coupon'),
					coupon_id: uni.getStorageSync('coupon_id')
				}
			}).then((res) => {
				this.packageGive = res.data.data;
			});
		},
		//地址添加或修改成功之后回调
		refreshList(data, type) {
			this.$request({
				url: 'address/address',
				method: 'POST',
				data: {
					data: data,
					type: 'add'
				}
			}).then((res) => {
				this.goodsDetail.addressData = res;
			});
		},

		// 选择推荐人回调
		referrer(name, id) {
			this.referrerId = id;
			this.referrerName = name;
		},

		// 提交订单
		orderSubmit() {
			let that = this,
				referrerId = that.referrerId;

			if (that.typekey == 0) {
				let addressId;
				addressId = that.goodsDetail.addressData ? that.goodsDetail.addressData.id : 0;
				if (!addressId) {
					if (that.sendType[that.current].name == '到店自提') {
						uni.showToast({
							title: '请选择用户信息',
							icon: 'none'
						});
						return;
					} else {
						uni.showToast({
							title: '请选择收货地址',
							icon: 'none'
						});
						return;
					}
				}
				let order = {
					lists: [],
					address_id: addressId,
					referrer_id: referrerId,
					send_type: that.sendType[that.current].name == '快递配送' ? 0 : that.sendType[that.current].name == '商家配送' ? 1 : 2,
					w_type: 0,
					w_id: 0,
					order_type: 0
				};
				// 店铺数据
				that.goodsDetail.orderData.lists.forEach((item, index) => {
					order.lists.push({
						shop_id: item.shop_id,
						products: [],
						coupon_id: item?.coupon?.length ? item.coupon.map((k) => k.id).join(',') : '',
						is_prepay: that.listIndex == true ? 0 : 1,
						is_balance: that.switchFlag == true ? 1 : 0
					});
					// 商品数据
					item.products.forEach((items, indexs) => {
						order.lists[index].products.push({
							goods_id: items.id,
							number: items.number,
							sku_id: items.sku.id,
							freight_id: items.freight_id
						});
					});
				});
				if (addressId === 0 && that.sendType[that.current].name != '到店自提') {
					uni.showToast({
						title: '请选择地区',
						icon: 'none'
					});
					return;
				}
				if (that.switchFlag) {
					if (Number(that.balance) < Number(that.prepayPrice) || Number(that.balance) == 0) {
						that.$wanlshop.msg('余额不足!');
					} else {
						if (this.addOrderData.length == 0) {
							that.addOrder(order);
						} else {
							// 删除没支付的订单
							that
								.$request({
									url: 'order/del_order',
									method: 'POST',
									data: {
										id: this.addOrderData[0].order_id
									}
								})
								.then((res) => {
									if (res.data.code == 0) {
										that.$wanlshop.msg(res.data.msg);
									} else {
										that.addOrder(order);
									}
								});
						}
					}
				} else {
					if (this.addOrderData.length == 0) {
						that.addOrder(order);
					} else {
						// 删除没支付的订单
						that
							.$request({
								url: 'order/del_order',
								method: 'POST',
								data: {
									id: this.addOrderData[0].order_id
								}
							})
							.then((res) => {
								if (res.data.code == 0) {
									that.$wanlshop.msg(res.data.msg);
								} else {
									that.addOrder(order);
								}
							});
					}
				}
			} else {
				let that = this;
				if (that.name == '') {
					that.$wanlshop.msg('请输入姓名');
				} else if (that.phone == '') {
					that.$wanlshop.msg('请输入手机号');
				} else {
					let order = {
						send_type: 3,
						username: that.name,
						mobile: that.phone,
						referrer_id: that.referrerId,
						lists: [],
						w_type: 2,
						w_id: uni.getStorageSync('yuyueid'),
						order_type: 'package'
					};
					console.log(that.dressList);
					// 婚纱店铺数据-优惠券id--
					that.dressList.forEach((item, index) => {
						// let youhuiq =
						order.lists.push({
							shop_id: item.shop_id,
							coupon_id: that?.packageData?.coupon.length ? that.packageData.coupon.map((k) => k.id).join(',') : '',
							products: [],
							ordertime: that.datetimesingle,
							is_prepay: that.listIndex == true ? 0 : 1,
							is_balance: that.switchFlagTwo == true || that.switchFlag == true ? 1 : 0,
							balance_pay: 0
						});
						order.lists[index].products.push({
							goods_id: item.package_id,
							number: 1,
							spec: item.spec
						});
					});
					if (that.switchFlagTwo || that.switchFlag) {
						if (that.balance < that.prepayPrice || that.balance == 0) {
							that.$wanlshop.msg('您在当前商户可用余额不足!');
						} else {
							if (that.packageOrderData.length == 0) {
								that.addPackageOrder(order);
							} else {
								// 删除没支付的订单
								that
									.$request({
										url: 'order/del_order',
										method: 'POST',
										data: {
											id: this.packageOrderData[0].order_id
										}
									})
									.then((res) => {
										if (res.data.code == 0) {
											that.$wanlshop.msg(res.data.msg);
										} else {
											that.addPackageOrder(order);
										}
									});
							}
						}
					} else {
						if (that.packageOrderData.length == 0) {
							that.addPackageOrder(order);
						} else {
							// 删除没支付的订单
							that
								.$request({
									url: 'order/del_order',
									method: 'POST',
									data: {
										id: this.packageOrderData[0].order_id
									}
								})
								.then((res) => {
									if (res.data.code == 0) {
										that.$wanlshop.msg(res.data.msg);
									} else {
										that.addPackageOrder(order);
									}
								});
						}
					}
				}
			}
		},
		addPackageOrder(order) {
			order.remarks = this.beizhu;
			let that = this;
			this.$request({
				url: 'order/addPackageOrder',
				method: 'POST',
				data: {
					order: order,
					coupon_id: that?.packageData?.coupon.length ? that.packageData.coupon.map((k) => k.id).join(',') : ''
				}
			}).then((res) => {
				if (res.data.code == 0) {
					that.$wanlshop.msg(res.data.msg);
				} else {
					console.log('订单ID', res.data.data.list[0].id);
					that.packageOrderData = res.data.data.list;
					that.getPackageOrder();
				}
			});
		},
		addOrder(order) {
			let that = this;
			order.remarks = this.beizhu;
			this.$request({
				url: 'order/addOrder',
				method: 'POST',
				data: {
					order: order,
					share_user_id: this.share_user_id ? this.share_user_id : '',
					coupon_id: this.coupon_id
				}
			}).then((res) => {
				if (res.data.code == 1) {
					console.log('订单ID', res.data.data.list[0].id);
					that.addOrderData = res.data.data.list;
					that.getOrderData();
				} else {
					that.$wanlshop.msg(res.data.msg);
					that.switchFlag = false;
				}
			});
		},
		// 提交婚纱订单数据
		getPackageOrder() {
			let that = this,
				type = '',
				method = '';
			uni.showLoading({
				title: '提交中···'
			});
			uni.login({
				provider: 'weixin',
				success: function (res) {
					that.packageOrderData.map((item, index) => {
						if (that.listIndex && (that.switchFlagTwo || that.switchFlag)) {
							type = 'balance';
							method = '';
						} else {
							type = 'wechat';
							method = 'miniapp';
						}

						that
							.$request({
								url: 'pay/payment',
								method: 'POST',
								data: {
									order_id: item.order_id,
									order_type: 'package',
									type: type,
									method: method,
									code: res.code
								}
							})
							.then((res) => {
								uni.hideLoading();
								if (res.data.code == 1) {
									if (!res.data.data.appId) {
										uni.showToast({
											title: res.data.msg,
											icon: 'success',
											duration: 2000
										});
										that.packageOrderData = [];
										setTimeout(() => {
											uni.redirectTo({
												url: '/pages/filePages/orderInformation/orderInformation?index=2&tabIndex=2'
											});
										}, 2500);
									} else {
										that
											.$wx_pay(res.data.data)
											.then((res) => {
												uni.showToast({
													title: '支付成功',
													icon: 'success',
													duration: 2000
												});
												that.packageOrderData = [];
												uni.redirectTo({
													url: '/pages/filePages/orderInformation/orderInformation?index=2&tabIndex=2'
												});
											})
											.catch((err) => {
												that.orderError(2);
											});
									}
								}
							});
					});
				}
			});
		},
		// 提交订单数据
		getOrderData() {
			let that = this,
				type = '',
				method = '';
			uni.showLoading({
				title: '提交中'
			});
			uni.login({
				provider: 'weixin',
				success: function (res) {
					that.addOrderData.map((item, index) => {
						if (that.listIndex && (that.switchFlagTwo || that.switchFlag)) {
							type = 'balance';
							method = '';
						} else {
							type = 'wechat';
							method = 'miniapp';
						}
						that
							.$request({
								url: 'pay/payment',
								method: 'POST',
								data: {
									order_id: item.order_id,
									order_type: 'goods',
									type: type,
									method: method,
									code: res.code
								}
							})
							.then((res) => {
								if (res.data.code == 1) {
									uni.hideLoading();
									//存在appId代表需要使用微信支付
									if (res.data.data.appId && res.data.data.status == 0) {
										that
											.$wx_pay(res.data.data)
											.then((res) => {
												uni.showToast({
													title: '支付成功',
													icon: 'success',
													duration: 2000
												});
												that.addOrderData = [];
												// 支付success后跳转到已支付tag
												uni.redirectTo({
													url: '/pages/filePages/orderInformation/orderInformation?index=2&tabIndex=1'
												});
											})
											.catch((err) => {
												that.orderError(1);
											});
									} else {
										uni.showToast({
											title: '支付成功',
											icon: 'success',
											duration: 2000
										});
										that.addOrderData = [];
										// 支付success后跳转到已支付tag
										uni.redirectTo({
											url: '/pages/filePages/orderInformation/orderInformation?index=2&tabIndex=1'
										});
									}
								} else {
									that.$wanlshop.msg(res.data.msg);
									uni.hideLoading();
								}
							});
					});
				}
			});
		},
		// 支付失败
		orderError(n) {
			let that = this;
			uni.showModal({
				title: '支付失败',
				content: '您的订单在2小时内未支付将被取消，要重新支付本次订单，请在“我的”页面，“待付款”中找到该订单进行支付',
				confirmText: '继续支付',
				cancelText: '确认离开',
				success: function (res) {
					if (res.confirm) {
						that.orderSubmit();
					} else if (res.cancel) {
						uni.redirectTo({
							url: '/pages/filePages/orderInformation/orderInformation?index=1&tabIndex=' + n
						});
					}
				}
			});
		},
		// 选择推荐人
		onchange(e) {
			this.referrerId = e.detail.value[0].value;
		},
		// 跳转搜索推荐人页面
		goScreen() {
			if (this.typekey == 0) {
				uni.navigateTo({
					url: './screen?shopId=' + this.goodsData[0].shop_id
				});
			} else {
				uni.navigateTo({
					url: './screen?shopId=' + this.packageData.shop_id
				});
			}
		},

		// 获取推荐人列表
		getScreen() {
			this.$request({
				url: 'user/getReferrerList',
				method: 'POST',
				data: {
					shop_id: this.goodsData.shop_id
				}
			}).then((res) => {
				if (res.statusCode == 200) {
					this.items = res.data.data.data.map((item, index) => {
						return {
							text: item.nickname,
							value: item.id
						};
					});
				}
			});
		},
		// 获取余额的数据
		getBalance() {
			let that = this;
			that
				.$request({
					url: 'user/balance_list',
					method: 'POST'
				})
				.then((res) => {
					that.balanceList = res.data.data;
					that.balanceLength = that.balanceList.length;
					res.data.data.map((item, index) => {
						if (that.typekey == 0) {
							if (that.goodsDetail.orderData.lists[0].shop_id == item.shop_id) {
								that.balance = item.balance;
							}
						} else {
							if (that.packageData.shop_id == item.shop_id) {
								that.balance = item.balance;
							}
						}
					});
				});
		},

		// 选择购买商品的数量
		goodsNumJian(number, index, indexs) {
			if (number == 1) {
				uni.showToast({
					title: '最少购买一件!',
					icon: 'none'
				});
			} else {
				this.goodsDetail.orderData.lists[index].products[indexs].number--;
				this.goodsData[indexs].number--;
				this.loadData();
			}
		},
		goodsNumJia(number, index, indexs) {
			if (this.is_coupon == 1) {
				return;
			}
			this.goodsDetail.orderData.lists[index].products[indexs].number++;
			this.goodsData[indexs].number++;
			this.loadData();
		},

		// 设置使用充值支付开关
		setWStatus() {
			if (this.gift.balance.is_balance == 0) {
				this.switchFlag = false;
				this.computed_price = null;
				uni.showToast({
					title: '该商品非充值余额支付商品',
					icon: 'none',
					duration: 2000
				});
				return;
			} else {
				let that = this;
				const user = uni.getStorageSync('userInfo');
				this.switchFlag = !this.switchFlag;
				if (this.leve && this.leve != '0.00/0.00' && user.identity > 1) {
					this.disabled = false;
					let goodsData = this.goodsData[0] ? this.goodsData[0] : this.goodsData;
					if (this.switchFlag && goodsData.level != '') {
						this.$nextTick(() => {
							this.orderPopup = true;
						});
					}
				}
			}

			//计算剩余支付金额
			var balance = parseFloat(this.balance);
			//listIndex 为 true代表全款，有抵扣选项
			if (this.listIndex) {
				if (this.sendType[this.current].name == '快递配送') {
					let price = parseFloat(this.price);
					this.computed_price = this.switchFlag ? (balance > price ? 0 : price - balance) : price;
				} else {
					let price = parseFloat(this.order_price);
					this.computed_price = this.switchFlag ? (balance > price ? 0 : price - balance) : price;
				}
			}
		},
		// 设置使用充值支付开关
		setWStatus2() {
			const user = uni.getStorageSync('userInfo');
			if (this.packageGive.balance.is_balance == 0) {
				this.switchFlagTwo = false;
				this.computed_price = null;

				uni.showToast({
					title: '该商品非充值余额支付商品',
					icon: 'none',
					duration: 2000
				});
				return;
			} else {
				this.switchFlagTwo = !this.switchFlagTwo;
				this.disabled = false;
				if (this.switchFlagTwo && user.identity > 1) {
					this.$nextTick(() => {
						this.orderPopup = true;
					});
				}
			}

			//计算剩余支付金额
			var balance = parseFloat(this.balance);
			//listIndex 为 true代表全款，有抵扣选项
			if (this.listIndex) {
				let price = parseFloat(this.order_price);
				this.computed_price = this.switchFlagTwo ? (balance > price ? 0 : price - balance) : price;
			}
		},
		handlePopupClose() {
			this.orderPopup = false;
		},
		handleCancel() {
			this.disabled = false;
			this.switchFlag = false;
			this.switchFlagTwo = false;
			this.orderPopup = false;

			var balance = parseFloat(this.balance);
			if (this.listIndex) {
				if (this.sendType[this.current]?.name == '快递配送') {
					let price = parseFloat(this.price);
					this.computed_price = this.switchFlag ? (balance > price ? 0 : price - balance) : price;
				} else {
					let price = parseFloat(this.order_price);
					this.computed_price = this.switchFlag ? (balance > price ? 0 : price - balance) : price;
				}
			}
		},
		handleSubmitSure() {
			this.disabled = false;
			this.switchFlag = true;
			this.orderPopup = false;
		},
		getSwitchTwo(e) {
			if (this.packageGive.balance.is_balance == 0) {
				uni.showToast({
					title: '该商品非充值余额支付商品',
					icon: 'none',
					duration: 2000
				});
			} else {
				this.disabledTwo = false;
				this.switchFlagTwo = e.detail.value;
			}
		},
		// 选择配送方式
		radioChange: function (e) {
			let that = this;
			for (let i = 0; i < that.sendType.length; i++) {
				if (that.sendType[i].value == e.detail.value) {
					that.current = i;
					break;
				}
			}
		},
		// 定金/全款
		onDjQk(ind) {
			this.listIndex = !this.listIndex;
			if (this.listIndex == false) {
				this.switchFlag = false;
				//减免后的金额重置
				this.computed_price = null;
				this.switchFlagTwo = false;
			}
		}
	}
};
</script>

<style scoped lang="scss">
.order {
	overflow: hidden;
	padding-bottom: 170upx;

	.bottom_box {
		background: #ffffff;
		box-shadow: 0upx -1upx 0upx 2upx rgba(0, 0, 0, 0.1);
		position: fixed;
		bottom: 0;

		.zong_money_txt {
			color: #000000;
			margin-top: 36upx;
			margin-left: 266upx;
		}

		.submit_btn {
			width: 240upx;
			height: 80upx;
			background: #ebbe87;
			border-radius: 40upx;
			line-height: 80upx;
			color: #ffffff;
			margin-top: 10upx;
			position: absolute;
			right: 30upx;
		}
	}

	.head_box {
		height: 86upx;
		background: #ffffff;
		padding-top: 26upx;
		padding-left: 32upx;

		.qingxz {
			color: #333333;
			line-height: 86upx;
		}

		.kdfh {
			margin-left: 34rpx;
			margin-top: 16rpx;

			.radio {
				color: #333333;
				align-items: center;

				.radio_txt {
					transform: scale(0.6);

					.txt {
						display: inline-block;
						margin-left: -10upx;
					}
				}
			}
		}
	}

	.add_shdz {
		height: 96upx;
		background-color: #ffffff;
		overflow: hidden;

		.add_box_xian {
			height: 30upx;
		}

		.add_shdz_icon {
			width: 48upx;
			height: 48upx;
			margin-top: 20upx;
			margin-left: 20upx;
		}

		.add_shdz_txt {
			width: 600upx;
			overflow: hidden;
			text-overflow: ellipsis;
			white-space: nowrap;
			margin-left: 16upx;
			line-height: 86upx;
		}

		.right_jt_icon {
			width: 16rpx;
			height: 23rpx;
			margin-top: 22rpx;
			position: absolute;
			right: 42rpx;
		}
	}

	.tuijian_box {
		width: 720upx;
		height: 96upx;
		background: #ffffff;
		margin-top: 20upx;
		padding-right: 30upx;
		overflow: hidden;

		/deep/ .uni-data-tree-input {
			width: 220upx;
			margin-top: 10upx;
			margin-left: 14upx;
		}

		.tuijianren_txt {
			line-height: 96upx;
			// width: 200upx;
			overflow: hidden;
			text-overflow: ellipsis;
			white-space: nowrap;
		}

		.uni-input {
			margin-top: 24upx;
			margin-left: 54upx;
		}

		.search {
			line-height: 94upx;
			position: absolute;
			right: 42upx;
		}
	}

	.goods_list_box {
		margin-top: 20upx;
		background-color: #ffffff;

		.header_box_goods {
			.add_shdz_icon {
				width: 48upx;
				height: 48upx;
				margin-top: 22upx;
				margin-left: 20upx;
				border-radius: 50%;
				overflow: hidden;
			}

			.add_shdz_txt {
				margin-left: 12upx;
				line-height: 86upx;
			}

			.right_jt_icon {
				width: 16rpx;
				height: 23rpx;
				margin-top: 22rpx;
				position: absolute;
				right: 42rpx;
			}
		}

		.goods_box_detail {
			width: 724upx;
			height: 184upx;
			background: #ffffff;
			padding: 26upx 0 26upx 32upx;

			.goods_image_box {
				width: 162upx;
				height: 162upx;
			}

			.right_name_state_money {
				margin-left: 32upx;

				.goods_name {
					width: 400upx;
					color: #333333;
					display: -webkit-box;
					-webkit-box-orient: vertical;
					-webkit-line-clamp: 2;
					overflow: hidden;
					padding-top: 30upx;
					box-sizing: border-box;
				}

				.guige_box {
					width: 408upx;
					height: 68upx;
					color: #666666;
					margin-top: 12upx;
				}

				.money_box {
					margin-top: 4upx;

					.money_icon {
						color: #ff3f4a;
						line-height: 56upx;
					}

					.mone_txt {
						color: #ff3f4a;
						font-family: Source Han Sans CN-Medium;
					}

					.huaxian_money {
						font-family: Source Han Sans CN-Regular, Source Han Sans CN;
						color: #999999;
						text-decoration: line-through;
						margin-top: 10upx;
						margin-left: 14upx;
					}

					.zen_jan {
						position: absolute;
						right: 30rpx;
						margin-top: 4rpx;

						.jan_box {
							width: 40upx;
							height: 40upx;

							.jan {
								width: 20upx;
								height: 4upx;
								background-color: #999999;
								margin: 50% auto;
							}
						}

						.num_txt {
							color: #000000;
							margin: 0 20upx 0 20upx;
						}

						.jia_box {
							width: 40upx;
							height: 40upx;
							color: #000000;
							line-height: 36upx;
						}
					}
				}
			}
		}

		.zen_goods_box {
			width: 686upx;
			background: #ffffff;
			padding: 0 32upx 32upx 32upx;

			.yl_class {
				padding-top: 42upx;

				.class-con {
					padding: 18upx 0;

					.class-left {
						color: #888888;
						line-height: 14px;
					}

					.class-right {
						color: #333333;
						line-height: 14px;
					}
				}
			}

			.dress_box_list {
				width: 685upx;
				margin-top: 8upx;

				.dress_title_txt {
					color: #000;
				}

				.dress_list_box {
					width: 534upx;
					margin-left: 24upx;
					margin-bottom: 20upx;

					.dress_name_txt {
						width: 318upx;
						overflow: hidden;
						text-overflow: ellipsis;
						white-space: nowrap;
						color: #888888;
					}

					.dress_price {
						color: #888888;
					}
				}
			}

			.zen_box_list {
				width: 638upx;
				background: #f4f5f9;
				border-radius: 16upx;
				padding: 16upx 28upx 16upx 20upx;

				.zen_list {
					.zen_left_txt {
						color: #888888;
						width: 550upx;
						height: 36upx;
						overflow: hidden;
						text-overflow: ellipsis;
						white-space: nowrap;
					}

					.zen_num {
						color: #888888;
					}
				}
			}

			.pt_yh_txt {
				margin-top: 36upx;
				margin-bottom: 36upx;
				align-items: center;

				.txt_left {
					color: #888888;
				}

				.txt_right {
					color: #888888;
				}

				.uni_ipt {
					margin-left: 56upx;
				}
			}
		}

		.xiaoji_txt {
			width: 100%;
			background-color: #fff;
			padding: 0 32rpx 20upx;
			box-sizing: border-box;
			justify-content: flex-end;

			.money_txt {
				color: #ff3f4a;
			}
		}
	}

	.dibu_fukuan_box {
		width: 100%;
		background: #fff;
		margin-top: 20upx;
		overflow: hidden;
		padding-bottom: 20upx;

		.fukuan_box {
			margin-top: 32upx;

			.left_btn {
				width: 332upx;
				height: 92upx;
				border-radius: 8upx;
				border: 2upx solid #666;
				line-height: 92upx;
				color: #000;
				margin: 0 auto;
			}

			.left_btn_active {
				width: 332upx;
				height: 92upx;
				border-radius: 8upx;
				background-color: #f66069;
				color: #fff;
				line-height: 92upx;
				margin: 0 auto;
			}

			.right_box {
				display: flex;
				flex-direction: column;
				justify-content: center;
				align-items: center;
				width: 332upx;
				height: 94upx;
				background: #f66069;
				border-radius: 8upx;
				margin-right: 32upx;
				color: #fff;
				.ding_j_txt {
					line-height: 40rpx;
				}

				.bottom_txt {
					line-height: 28rpx;
					color: #fff;
				}
			}

			.right_btn {
				display: flex;
				flex-direction: column;
				justify-content: center;
				align-items: center;
				width: 332upx;
				height: 92upx;
				border-radius: 8upx;
				border: 2upx solid #666;
				line-height: 92upx;
				color: #000;
				margin-right: 32upx;
			}
		}

		.bottom_txt_zf {
			margin-left: 32upx;
			margin-top: 38upx;

			.cz_zhifu {
				color: #888888;
			}

			.yue_txt {
				color: #333333;
				margin-left: 6upx;
			}

			.goods_money_bot_txt {
				color: #ebbe87;
			}
		}
	}
}
</style>
<style>
page {
	background-color: #f4f5f9;
}
</style>
